package reflect;

import reflect.annotations.AutoRunClass;

import java.lang.reflect.Field;

public class ReflectDemo9 {
    public static void main(String[] args) throws Exception {
        Class cls = Class.forName("reflect.Person");
        Object obj = cls.newInstance();
        boolean isAutoRun = cls.isAnnotationPresent(AutoRunClass.class);//判断类上是否有AutoRunClass注解
        System.out.println( isAutoRun?"被标注了":"没有被标注");
    }
}
